package com.kx.yooli.kx.wechat.controller.message;

import com.google.gson.JsonObject;
import com.kx.yooli.kx.wechat.constant.Constants;
import com.kx.yooli.kx.wechat.po.result.AjaxResult;
import com.kx.yooli.kx.wechat.service.IMessageSend;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.ibatis.annotations.Param;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author john_sqwen
 * @date 2024/3/21
 * @PROJECT_NAME wechat
 * @description create MessageController by john_sqwen
 * and messageController value is
 */
@RestController
@RequestMapping("/api/message/")
@Tag(name="message" ,description = "自动回复控制器")
public class MessageController {
    private final Logger log = LoggerFactory.getLogger(MessageController.class);
    @Resource
    private IMessageSend iMessageSend;
    @PostMapping("sendVerifyCode")
    public AjaxResult sendMessage(@RequestBody String params){
        log.info("request value is  {}",params);
        return iMessageSend.sendMessageByPhone(params, Constants.CODETYPE);
    }

}
